﻿<MenuItem 
    x:Class="TfsWorkbench.NotePadUI.MainMenu"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:properties="clr-namespace:TfsWorkbench.NotePadUI.Properties"
    xmlns:uiElements="clr-namespace:TfsWorkbench.UIElements;assembly=TfsWorkbench.UIElements"
    mc:Ignorable="d" 
    x:Name="PART_MainMenu"
    d:DesignHeight="300" d:DesignWidth="300"
    Header="{Binding Source={x:Static properties:Settings.Default}, Path=Title}"
    >
    <MenuItem.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="/TfsWorkbench.UIElements;Component/Resources/CommandButtonStyles.xaml"/>
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </MenuItem.Resources>
    <MenuItem 
        Header="Bring To Front"
        Command="{x:Static uiElements:CommandLibrary.ShowDisplayModeCommand}" 
        CommandTarget="{Binding RelativeSource={RelativeSource AncestorType={x:Type UserControl}}}" 
        CommandParameter="{Binding ElementName=PART_MainMenu, Path=DisplayMode}"
        >
        <MenuItem.Icon>
            <ContentControl Template="{StaticResource BringToFrontIconTemplate}" Style="{StaticResource MenuIconStyle}" />
        </MenuItem.Icon>
    </MenuItem>
    <Separator />
</MenuItem>
